package mnet

/*
 * util module.
 */
import "runtime/debug"

func RunWithoutPanic(f func()) {
	defer func() {
		if err := recover(); err != nil {
			buf := debug.Stack()
			log().Error("[net] panic: %v\n%s", err, buf)
		}
	}()
	f()
}
